package 函数式接口;

import java.util.function.Function;

/**
 * 函数式接口： 只有一个方法的接口
 */
public class FunctionDemo {
    public static void main(String[] args) {
        Function<String, String> function1 = new Function<>() {
            @Override
            public String apply(String s) {
                return s;
            }
        };

        Function<String, String> function = str -> str + "123";

        System.out.println(function.apply("123kdf"));
    }
}
